// StorageDatabase.h: interface for the CStorageDatabase class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_STORAGEDATABASE_H__7DCB7E53_0A2E_4084_843D_650D84A81D69__INCLUDED_)
#define AFX_STORAGEDATABASE_H__7DCB7E53_0A2E_4084_843D_650D84A81D69__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ConfigurationV.h"
#include "ado.h"

class CStorageDatabase : public CConfigurationV
{
// Interface
public:
	void SetConnSql(const CString& strSql);
	CADORecordset* Connect();
	virtual void Remove();

// Construction/Destruction
public:
	CStorageDatabase();
	virtual ~CStorageDatabase();

// Data
protected:
	static CADODatabase m_Ado;
	CString m_strSql;
	CADORecordset* m_pRS;
private:
	static CString m_strConnect;

// Implement
protected:
	virtual void _ReadConfiguration();
	inline bool _ConnectDB();
	CADORecordset* PreSave();
	virtual void OnNew(CADORecordset* pRS) =0;
};

#endif // !defined(AFX_STORAGEDATABASE_H__7DCB7E53_0A2E_4084_843D_650D84A81D69__INCLUDED_)
